Worked on to make it more robuts