refacotring for readability