merge cpp with h
fixed code. will compile now.