added controller validation
udpated resource function
rename arguments
updated example
change version