First really working version