removed not so magic numbers, include header of image