logic layer finished