Final version of my bachelor's thesis. Possibly will be helpful for ITMO students ;)