better source handling