posting code for debug