Added first functional (from library point of view) version