minor formatting change+comment, major restructure of this to come, making use of API if possible