2048, modified from gabrielecirulli's work