CORRECTED parentheses and included nonexistent movements bugs; started helper functions