Revert "seperated functions"

This reverts commit 382d54b27b7374eeab6ac5840acfbbd8f236ba52.