fixed bug and added z position to control line thickness