B functionality and comments added