refactored, added shares generator