removed param argument and made parameter global