work on hash before array