added first partly working version