function meet code specification