My implementation of n-body problem