working bottom sort