changed internal layers to logisitic fn