Added creation code for gaussian model +bugfix