fixing variable declaration of service_type; removing readonly it since it is passed and declared in several areas