Revised and tested last commit