remove unwanted code causing extra DB calls