New basic version
Just one 'f' corrected in the common logic