intermediate implementation

contains compile errors