Added a function that uses char* instead of individual bits