adding snake constructor