this method has too much lines of logic, a method should not have more than 15 lines of code