added border_method, fixed pixelvalue