refactored functions exercise to test self invoking functions