remove code duplication and one excess question