continuing on code optimization