changed syntax and code a litle