Retval to end compiles but not fully tested