less code, more flexible