fixing passing val