Fermion masses and mixings in a S4 based model