Added location function