made signing task more generic