Added quality assurance code