put most ugly in functions