created function show and modified function main