jank works 100%. needs refactoring and comments