refactored some stuff to make future updates easier