flask initial
tests almost working
all tests passed
fixes after rebase