Pass sourceA and sourceP though parameter instead of static ref

Signed-off-by: plysan <plysab@gmail.com>