mostly functional now