fixed bleach bug and added tests