It works on a basic level - needs optimizations