extract perfect_common to separate project