fixed bug in dtestchebpoly. still need to decide how to handle shape function