some updates to code