Simplified code for better readibility.