updated code for followup post