Simplified code to three methods