Simplifying code

Simplifying code