remodified and started to use the fn_id instade of the fn_name in the database tables