code improved4