better solution for get_bits
omit default from switch statement
get_bits change parameter