fixed default parameters, proper fetching of variable