Final version. Everything is working!)