Renamed assemble_reply to reply

& moved the whole reply code there