Finally a code which is working on production