improved for one line answer