updated fully working2