added another check in impl