complete overhaul of the API