Updated to allow for taking parameters