added delegate method for changing content size