creating struct with proc