added display loop, started working on bugs