not the delegate approace but works (kindof)