implemented target_to_rule method
choose_variable method implementation