editted from the beginning to header files