making the function optional