further code cleanup