bit substring M of N init
make m substring of n
init +
wrong implementation but too tired will finish tmw