fixed a bug with a missing import. minor code clean up.