work in progress. saved bfore restructure