tests passed, need refactor (noob code)
Need optimization
Maybe async