initial implementation (mostly just a skeleton framework)