began to write address input function