repeat working but feel like code can be refactored and made clearer