updated code for 2048