Updated getting ownername method