The complete version.With apply ali mihandoost gratefull hints.