code cleanup/update