uff too much code to describe in one commit