implemented source-direction option functionality