code cleanup for readability