with header file working