added dropout layer; bug fixes