New simpler implementation