initial commit, not very clean but works :)