implemented spawn location . fix code