got rid of the black lines between pixels and took care of the corner cases