moved username and id to top of script