making changes in startangle() and endangle()