tidy up computeSize
organize imports