It works. Needs perf improvement