* added switch-case and sorted in new functions