working hook, now to make it do proper actions