added option to change strictness of algorithm