added function to inverte picture