other version with some fixs