Updated the api so it has a cleaner syntax