working changes, incomplete, need to merge in style changes