added option to specify problem type