initial commit, half-working experimental version