trying to add support for pcall to catch errors