added nil support