still in progress. Merging with main body