Made some changes to simplify usage