added delegate support