added copyright, removed cast and adjusted javadoc