created function for splitting element into individual attributes