commiting a check_size function and tests