added object oriented functionality