moved stuff to logical structure