some code for POJ