fixed logic
work with sinbles and tens