code works good now