remove typehint
add docblock
remove unneeded if block