added constness support for struct