fixed black jack case and refactored