updated functional stuff