So I started keeping records of exactly what I was eating through fitday, and eating a lot healthier than I was previously. Im at about 2200 calories a day, about 47% protein, 31% carb, and 22% fat. When I started, I was at about 226 lbs. I hadn't been doing any heavy lifting at all, just some situps here and there and occasional pushups. I kept my cardio up through cycling. Weight came off at first, and I dropped down to about 222.5lbs. A few days after, I got a membership at a gym. I've been going about 3 times a week, and I have been about 5 times since I started. Thing is, my weight went up. I'm now at 227lbs, but according to the BIA bf% scale at the gym I've gone from 21.6% bodyfat to about 19.2%. I know BIA can be effected by a lot of things like hydration and that, and I'm not sure of the margin of error on that specific test. At the gym, I will do about an hour and a half of heavy lifting, working most of my muscle groups. I have noticed that I am definitely getting stronger in my chest and abs. So my question is, how much of this can I attribute to gaining muscle? I have read that putting on lean mass while in a deficit is very hard. Just looking for some opinions on this one.