some small chnges and error removal