implement refct primitive