small refactoring

removed unnecessary variable
added annotation
try to use bounds in type inference
 if some parameters are unknown