fix to work with changed api