shifting some code aroundaaaaaaaaaaaaaaaaaaaaaaaa