now working perfectly