better code for reuse