passing location object instead of its properties separetly