Adding function to new button
Added functionality for New