reduce bitmap size problem, need to externalize the treatment