Issue 1004

changing according to william's propose!