Updated and refactoring (unsure)