updated some code