fixed long runtime. still needs comments and stuff fosho