remove unneeded cast
add helper method