made reused code similar
made reused code similar