new api

revamped the api so it's a lot cleaner now