removed dangling k and some empty lines