simplify syntax

This code does the same things.