adding cast. Required to compile with java 8
added comment