added request code functionality