serial implementation
basic template working