updated criteria , bug fixes