Code working, but still need some optimization and prunning.