changed the user as root
Added assign function