use decorator to return this and changed some prototyping code.