Worked version (without database)