sanitize array before use it