switched functions around