added more type hinting