Added or test and fixed beginning to end