share code for line