deleted useless methods and changed the API(s) to implement the new way