partially working progress on implementation