Fixed find error

implemented jquery objects correctly. fixed reliance on state object