fixed indention and bugs