refactored like woah