Improvement1: typecheck and header