added code location function