getsource moved into standalone method