removed unused code
formatted code