Implemented most of scatter functionality