MAJOR rework and simplified
MAJOR rework and simplified