Seperated the parse sample code