First completely working version