changed from padding to loops