implemented underscore each function