changed all code to be cpp compatible and added code for feed_forward and testing feed_forward