code cleanup and readibility