Nesting non public functions
Renamed local variable for readibility