more compact and correct