cleaned script for readability