partially working solution
input is binary
not working