+ masking unused bits (less errors);
+ refactored bits[] usage