define return code properly