make factory method a little better