server side updated

but its not complete, security is absent.