removed un. code
added update button
update function working