first attempt at featherstone implementation