refactoring apply
function related stuff.
spät ists.