fixing calendar is not a function