simplifying code