improve code of adding data to ...