fixed error: pass=string and added more functions