Revamped version impl.