added type definition and erb template