duplicate check function modified

checkDupicates method - dead code - else block removed