added shape coeffs
fixed implicit coercion bug, removed unused code