basically works. the sql query is not so accurate yet though since handle_id is not used consistently