working program

it runs good but could be improved gui etc