Working version. Needs work on ui and handleing some edge cases