right now many scalar operations and if statements are applied w/ loops where they could be faster vector or array operations