simplify code
simplify code (once again)
adding types aliases
fix compilation errors
simplify code
simplify code