improved signature functions; added valid?