done using oops concept