use variable to store size instead of recalculating it every time