removed unused validate function