might not need some of the if else statements at bottom