variable done, haven't tested yet, may need further modifications