added a copyright header
added a copyright header and fixed implementation of splitText