use vectors to determine lines