ending curly brace was on wrong line, causing compiler error