shuffled around methods to make future merging easier