updated as per ecto review