added some functional stuff