added framework for header functionality. changed layer name to input in .layer