fixed all bugs, made includes more dynamic