rearranged/simplified code and added names command