added new local variable 'usertype'