basic function recognition and handling