Added bitmanip functions