implemented main class that handles all API commands