added lines logic and display