update open line above and open line below functions