code cleanup for clarity