making functions works