Sort of working verion