fixed tons of bugs. writing V component algorithm