UNFINISHED: some code changes