added attr fling_handle_id, cleaned code a bit