put dereference into separate class