finally working perfectly!