add an implementation of Mark's approach and use this one for now