added greg
implemented delegate