functional. veeery slow.