added OO functionality