added function to header file