modified with new Type
commited incidently
modified with simple functions