added typechecking
remove unnecessary comment