Changed the API little bit