with some changes in header file