Changed the API a bit