refactored UI, added samples to theory