invert line done
clean code a bit