changed a little bit of api