// design & implementation by myself