More compact form based on comments from @ohadlevy