added comments, level is now painted only once