revised and fixed