minor cleanup and improvment