add error handling in combinef