add dotPsci task
add some type annotations and get rid of unused function