adapting to madek api changes