implemented first functions