cleaned up so much fucking code like omg i deserve a medal