Initial chapter generatefeedvector code (buggy)