work with optional variables