refactoring : added utility class to avoid repetition for bitmap generation etc.