optimize current code