simplify. revisit implementation of lost features later