empty return value fix and task short code refactoring