first commit I guess, not my best work and it is quite old