Modified namespace and added namespace function