fixed and finally completed stub