Code optimization again