Worked on shiprender function