cleaned up structure & style