made changes to single_layer