added headers and main now compiles