design complex patterns