clean up as per afshin's comments