added fully connected network toy function