refactor and coords in params