another round of changes, several issues need fixing