code cleanup: get rid of impl casting
add return statement fix