-simplified a few functions